Open
Conversation
Migrated NuclearCraft Neoteric from Forge 1.20 to NeoForge 21.1.219 (MC 1.21.1). 562 files changed across all mod systems: registration, capabilities, networking, blocks, items, fluids, recipes, client rendering, data generation, world gen, entities, and compat modules. Key architectural changes: - Platform translation layer at igentuman/api/platform/ (25+ wrappers) - DeferredRegister/DeferredHolder replaces RegistryObject throughout - DataComponents replaces NBT for ItemStack/FluidStack metadata - Capability system rewritten (RegisterCapabilitiesEvent) - Attachments replace capability providers (NCAttachments) - CustomPacketPayload records replace SimpleChannel networking - NcIngredient no longer extends Ingredient (final in 1.21.1) - Recipe system uses MapCodec/StreamCodec via NCRecipeSerializerFactory - Mekanism compat: Gas/Slurry unified to Chemical API Compat modules excluded (no 1.21.1 ports): OC2, TIS-3D, KubeJS, Refined Storage, AE2. BFR integration stubbed out. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add TODO markers to all disabled compat call sites (TiC, BFR, KubeJS, AE2, RS) indicating we're waiting on those mods to port to NeoForge 1.21.1 - Annotate build.gradle exclusions with mod names and TODO header - Verify Mekanism 10.7.18 API against JAR: split MekRadiationManager mixin into MekRadiationManager + MekRadiationUtil (getRadiationResistance moved to RadiationUtil in 10.7.x); register both in nuclearcraft.mixins.json - Remove stale TODO from MekInteractions (Capabilities.CONFIGURABLE confirmed) - Fix client crash: ScreenEvent.KeyPressed/KeyReleased are abstract in 1.21.1, use .Pre subclasses - Fix client crash: ColorHandler.register() was adding MOD bus events to game bus (already registered via @EventBusSubscriber) - Fix client crash: TickHandler.onTick @SubscribeEvent on static method rejected by NeoForge instance-based bus registration - Fix client crash: rendertype_blackhole.vsh remove IViewRotMat (removed in 1.20.5) and update fog_distance to 2-arg signature (Position, FogShape) - Fix client crash on join: WorldEvents.onLevelTick add isClientSide() guard to prevent ClassCastException (ClientLevel -> ServerLevel) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…t check - Fix barrier items in generated recipes: use NcIngredient.toJson() instead of asIngredient() which resolves tags at datagen time (empty → barrier) - Fix solar panel/dimensional blend recipes using dustIngredient().asIngredient() - Fix blockItem() loop bug checking wrong variable in AbstractRecipeProvider - Fix forgeFluid() namespace (forge → neoforge) and forgeIngredient() (c: tags) - Comment out chemical reactor recipes for materials without fluid forms (coal, graphite, chromium, osmium, silicon, niobium, titanium, etc.) - Fix xenorium fusion recipe typo (xenorium298 → xenorium/298) - Skip xenorium/quantite _ox/_ni/_za variants in chemical reactor - Fix Item.toString() returning namespaced IDs in 1.21.1 breaking HashMap lookups in TurbineCoilBlock, TurbineCoilBE, TurbineBladeBE, CommonConfig - Fix negative burn time crash: burnTime default -1 → 0 in MultitoolItem, NCBaseItem, RadShieldingItem (NeoForge 1.21.1 throws on negative) - Fix ItemStackIngredient.copy() crash: RegistryAccess.EMPTY → built-in registries (stream codecs need item registry for serialization) - Add 7 missing sound subtitle translations (boss, blackhole, laser) - Add black_hole blockstate JSON with powered variants - Add 19 missing EMI c: namespace tag translations - Fix RuntimeFuelModelGenerator missing parent directory - Add EMI particle_source_info category translation Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…anslations - Fix battery block UV coordinates (0-16 → 0-1) for NeoForge 1.21.1 normalized sprites - Migrate 523 bucket model JSONs from forge: to neoforge: (fluid_container loader + parent) - Migrate fluid color system from deprecated FluidType.initializeClient() to RegisterClientExtensionsEvent - Implement direct FluidEntry item-identity bucket color lookup (bypasses broken IClientFluidTypeExtensions resolution) - Re-enable AE2 compat module (AE2 19.2.17 for NeoForge 1.21.1) with mod-loaded guards - Fix empty Fuel Reprocessor EMI category translation Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adapted for NeoForge 1.21.1: - Kept useWithoutItem() signatures (NeoForge API) - Added onPlace/onRemove multiblock tracking for accelerator ports - Added isAcceleratorTooHot() method - Dropped getOCDevice() (OC2 not ported, LazyOptional removed in NeoForge) - Removed redundant ParticleSources.init() from onConstruction Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…f List for validators The TOML config system was stuck in an infinite correction loop because: 1. Enum config values used define() instead of defineEnum(), causing type mismatch on deserialization (String vs enum) 2. List validators used instanceof ArrayList, but TOML reader returns generic List implementations Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix mutable BlockPosInstance corrupting dimension probes: use immutable BlockPos for all resolution and helper methods (getSidePos, getForwardPos, etc.) - Remove async multiblock validation: runs synchronously on server thread now, compatible with SpeedChunk's parallel BE ticking model - Remove direct chunk section reads: all block reads go through Level.getBlockState() so SpeedChunk can properly handle cross-chunk access - Remove chunk cache, CompletableFuture, and MultiblockExecutorManager dependencies - Fix invalidateCache() eagerly resetting isCasingValid/isInternalValid on the controller BE, causing client to briefly see "incomplete" during re-validation - Fix all 8 port BEs missing sendBlockUpdated() in setMultiblock(), causing client to not receive formation state updates - Fix FissionPortBE early return before connected-state sync when no recipe loaded - Fix all 5 port containers conditionally adding fuel slots, causing server/client slot count mismatch and IndexOutOfBoundsException - Fix tag lookup: use BlockState.is(TagKey) for NeoForge 1.21.1 tag resolution - Add diagnostic logging for multiblock dimension resolution Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
NC was using Level.sendBlockUpdated() to sync block entity data to clients. This interfered with vanilla's ChunkHolder dirty flag system, causing cross-chunk update failures when combined with SpeedChunk's parallel ticking. - Add syncToTrackingClients() to NuclearCraftBE: sends ClientboundBlockEntityDataPacket directly to tracking players via Netty, completely bypassing ChunkHolder's section tracking - Replace all 51 sendBlockUpdated calls across all NC block entities with syncToTrackingClients() - Fix PacketWorldRadiationData ConcurrentModificationException: snapshot HashMap on construction instead of holding live reference - Fix pack_format: 15 → 34 for 1.21.1 - Remove validate() pre-reset of outerValid/innerValid/isFormed: validate sets these based on actual results, no pre-clearing needed - Remove dead canTick field from AbstractMultiblock Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
NeoForge 1.21.1 uses the common "c:" namespace (shared with Fabric) for cross-mod tags instead of "neoforge:". NC was registering all fluid tags under neoforge:oxygen, neoforge:hydrogen, etc. which didn't match Mekanism or other mods using c:oxygen, c:hydrogen. - Add commonRl() helper for c: namespace ResourceLocations - Change forgeFluid() default from "neoforge" to "c" (recipe ingredients) - Change NCFluids tag registration from neoforgeRl() to commonRl() - Fix Chemical2FluidConverter tag lookup to use c: namespace - Fix MekChemicalConversionRecipe tag lookup to use c: namespace - Fixes cross-mod fluid compatibility (Mekanism oxygen in NC recipes, etc.) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Register Mekanism CHEMICAL capability on all NC block entities, enabling chemical pipes to push into NC machines - Chemical2FluidConverter: prefer nuclearcraft: fluid by direct registry lookup before falling back to c: tag - Fix fluid tank renderer: use FluidEntry.color() directly instead of broken IClientFluidTypeExtensions resolution (same fix as buckets) - Fix push methods: iterate ALL output slots instead of returning after first slot (items and fluids). Fixes multi-output machines like isotope separator not ejecting from all slots - Regenerate all datagen: 9500+ recipe JSONs updated from neoforge: to c: fluid tag namespace - Add tag-based fluid validation in isValidSlotFluid (sharesFluidTag) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Full port of NuclearCraft Neoteric from Forge 1.20 to NeoForge 21.1.219 / Minecraft 1.21.1 / Java 21.
Migration completed:
net.minecraftforge→net.neoforged.neoforgeDeferredRegister/DeferredHolderwith typed factory methodsRegisterCapabilitiesEvent+IItemHandler/IFluidHandler/IEnergyStorageCustomPacketPayloadrecords viaRegisterPayloadHandlersEventDataComponents.CUSTOM_DATAviaNCItemStacks/NCFluidStacksplatform layerLiquidBlock(FlowingFluid), burn time semantics,ArmorMaterialregistryRecipeHolderunwrapping,MapCodec/StreamCodec,RecipeInputRegisterColorHandlersEvent,RegisterClientExtensionsEvent, normalized UV coordsNeoForgeTypes), Mekanism (unifiedChemical), AE2 (19.2.17), EMI, GregTechc:namespace),RecipeOutput, holder-based loot/enchantment APIsigentuman.api.platformpackage with 15+ wrapper classesPhase 16 fixes (multiblock formation + testing):
BlockPosInstancecorrupting dimension probes; use immutable BlockPos snapshots for all resolution methodsouterValid/innerValid/isFormedbefore validation;validate()sets state from actual resultssendBlockUpdatedcalls with directsyncToTrackingClients()(sendsClientboundBlockEntityDataPacketdirectly, bypassesChunkHolderdirty flag system)sendBlockUpdatedto all portsetMultiblock()methods; remove early return before connected-state sync in FissionPortBEinvalidateCache()only setshasToRefreshflag, no longer resets controller BE fieldsneoforge:toc:namespace (1.21.1 convention); regenerate 9500+ datagen recipe JSONsCHEMICALcapability on all NC block entities;Chemical2FluidConvertermaps chemicals to NC fluids via direct registry lookupFluidEntry.color()directly in tank renderer (same fix as bucket colors)pushItems/pushFluidsthat skipped remaining output slotsisValidSlotFluidchecks sharedc:tags, not just exact fluid matchConcurrentModificationExceptionon Netty threadBlockState.is(TagKey)for NeoForge 1.21.1 tag resolutionCompat module status:
Testing done:
Remaining work:
Test plan
🤖 Generated with Claude Code